package com.k8.common.constants;

/**
 * 此constants中的每个字段的value作为URL中的key，而环境变量中的同名字段的value作为value存入URL中
 */
public interface CommonKeyConstants {
    String USER_NAME = "k8.config.username";
    String PASSWORD = "k8.config.password";
    String SERVER_ADDR = "k8.config.serverAddr";
    String PROTOCOL_KEY = "k8.config.protocol";
    String PROXY_KEY = "k8.config.proxy";
    String HOST_KEY = "k8.config.host";
    String PORT_KEY = "k8.config.port";
    String PATH_KEY = "k8.config.path";
    String VERSION_KEY = "k8.config.version";
    String GROUP_KEY = "k8.config.group";
    String IO_TIMEOUT_KEY = "k8.config.ioTimeout";
    String CLUSTER_KEY = "k8.config.cluster";
    String BALANCE_KEY = "k8.config.invokerBalance";
    String INTERFACE_KEY = "k8.config.interfaceKey";
    String INSTANCE_KEY = "k8.config.instance";
    String SIDE_KEY = "k8.config.side"; //指定角色
    String PROVIDER = "k8.config.provider";
    String CONSUMER = "k8.config.consumer";
    String EXPORTER_KEY = "k8.config.exporter";
    String METHODS_KEY = "k8.config.methods";
    String SERIALIZE_KEY = "k8.config.serializer";
    String APP_KEY = "k8.config.appName";
    String THREAD_POOL_TYPE = "k8.config.threadPoolType";

    //超时时间，单位毫秒
    String THREAD_POOL_TIME_OUT_KEY = "k8.config.threadTimeout";
    String SCHEDULE_GAP_TIME_KEY = "k8.config.scheduleTime";
    String TASK_TIME_OUT_KEY = "k8.config.taskTimeOut";

    String CORE_THREAD_COUNT_KEY = "k8.config.coreThread";
    String Limit_THREADS_COUNT_KEY = "k8.config.threads";
    String MAX_THREAD_COUNT_KEY = "k8.config.maxThread";

    //选择的exchange
    String EXCHANGE_KEY = "k8.config.exchange";

    //BlockingQueue
    String BLOCKING_QUEUE_TYPE_KEY = "k8.config.blockQueueType";

    String ARRAY_QUEUE_LIMIT_LEN_KEY = "k8.config.arrayQueueLimit";
    String REJECT_POLICY_KEY = "k8.config.rejectPolicy";

    String CLUSTER_NAME_KEY = "k8.config.clusterName";
    //消费者订阅时可以设置，代表订阅哪些实例，以,分割
    String CLUSTER_SET_KEY = "k8.config.clusters";

    interface RpcKeyConstant {

        String API_SIGNATURE_KEY = "k8.config.apiSignature";
        String EXPORTER_SIGNATURE_KEY = "k8.config.exporterSignature";

    }
    interface RegistryKeyConstant {
       /* String REGISTRY_SIGNATURE_KEY = "k8.config.registrySignature";
        //providers,routers,configurators
        String CATEGORY_KEY = "k8.config.category";
        String PROVIDERS_CATEGORY = "k8.config.providers";
        String ROUTERS_CONFIGURATORS_CATEGORY = "k8.config.routers&configurators";*/
        String INSTANCE_GROUP_KEY = "k8.config.registryGroup";
        String MAPPING_GROUP_KEY = "k8.config.registryGroup";
        String CONFIGURE_GROUP_KEY = "k8.config.registryGroup";
        String REGISTRY_RETRY_PERIOD_KEY = "k8.config.registryRetryPeriod";
        String CACHE_REGISTRY_FILE_KEY = "k8.config.cacheRegistryFileName";
        String REGISTRY_KEY = "k8.config.serviceRegistry";

        String SYNC_SAVE_CACHE_KEY = "k8.config.syncSaveFile";

        String REGISTRY_CHECK_KEY = "k8.config.registryCheck";
        String INSTANCE_WEIGHT_KEY = "k8.config.weight";
        //******* attribute
        String METADATA_KEY = "k8.config.metadata";
        String SERVICE_INSTANCES_KEY = "k8.config.instancesKey";
        String CONFIG_TYPE_KEY = "k8.config.remoteConfigType";
    }
}
